package net.da.client.service;

import net.da.client.dto.LoginRequestData;
import net.da.client.dto.LoginResponseData;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.ServiceDefTarget;

public interface AuthorizeService extends RemoteService {
	/**
	 * Utility class for simplifing access to the instance of async service.
	 */
	public static class Util {
		private static AuthorizeServiceAsync instance;
		public static AuthorizeServiceAsync getInstance(){
			if (instance == null) {
				instance = (AuthorizeServiceAsync) GWT.create(AuthorizeService.class);
				ServiceDefTarget target = (ServiceDefTarget) instance;
				target.setServiceEntryPoint(GWT.getModuleBaseURL() + "/AuthorizeService");
			}
			return instance;
		}
	}
	
	public LoginResponseData loginUser(LoginRequestData logingRequest);
}
